layui.use('layer', function(){
  var $ = layui.jquery, layer = layui.layer;
  $.ajax({
	type: 'post',
	dataType: 'json',
	url: listSrc,
	data:{
		id:id
	},
	success: function(data) {
		var mid=data.mid;
		$("#gdTheit").html('<span class="f-orange f16">标题：'+data.title+'</span> <span class="f-gray f12">发起人：'+mid+'</span> <span class="f-gray f12">发起时间：'+data.create_date+'</span> ')
	    $(".ask-wbk").attr("data-id",mid)
	    $("#subject-content").html(data.content);
	    var hfHtml="";
	    $.each(data.replys,function(i,v){
	    	hfHtml+='<div class="replys-hf"><p>['+v.create_date+']'+v.admin_id+''+v.title+'</p><p>'+v.content+'</p></div><hr>'
	    })
	    $("#replys").html(hfHtml);
	    
	}
  })
})


function submitAns(){
	var title='回复：'+$(".ask-wbk").attr("data-id");
	var content = $(".ask-wbk input[name=content]").val();
	var post_time = $(".ask-wbk input[name=post_time]").val();
	var pid = $(".ask-wbk input[name=pid]").val();
	$.ajax({
		type:'post',
		dataType:'json',
		url:hfSrc,
		data:'title='+title+'&content='+content+'&post_time='+post_time+'&pid='+pid+'&token='+token+'',
		success:function(data){
			layer.msg(data.msg);
			if(data.code==1){
				location.reload();
			}
		}
	});
	
	
}
